<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: table_home_visitor.php 31354 2012-08-16 03:03:08Z chenmengshu $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

class table_common_contact extends discuz_table
{
	public function __construct() {

		$this->_table = 'common_contact';
		$this->_pk    = '';

		parent::__construct();
	}

	public function get_all_info(){
		return DB::fetch_all('SELECT * FROM %t', array($this->_table));
	}

	public function get_info($id){
		return DB::fetch_first('SELECT * FROM %t WHERE id=%d', array($this->_table, $id));
	}

	public function edit_info($name, $content, $id){
		$data['name'] = $name;
		$data['content'] = $content;
		return DB::update($this->_table, $data, DB::field('id', $id));
	}




}

?>